home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Internet Strate…Tools for the Enterprise / Microsoft Internet Strategy & Tools for the Enterprise.iso / bkoffice / inetsrv.nts / nt351qfe.usa / mpr / i386 / winnt / oemnsvrr.inf < prev    next >
INI File  |  1995-10-07  |  28KB  |  690 lines

  1. [Identification]
  2.     OptionType = NetService
  3. [Options]
  4.     NWLNKRIP
  5. [FileConstants]
  6. Manufacturer    = "Microsoft"
  7. ProductMajorVersion     = "3"
  8. ProductMinorVersion     = "51"
  9. ProductVersion  = $(ProductMajorVersion)"."$(ProductMinorVersion)
  10. ProductNWLNKRIPName  = "NwlnkRip"
  11. ProductNWLNKRIPImagePath  = "%SystemRoot%\system32\drivers\nwlnkrip.sys"
  12. ProductSAPName          = "SAP"
  13. ProductKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwlnkRip\CurrentVersion"
  14. ProductSAPKeyName  = $(!NTN_SoftwareBase)"\"$(Manufacturer)"\NwSapAgent"
  15. [GeneralConstants]
  16. UtilityInf       = "UTILITY.INF"
  17. subroutineinf    = "SUBROUTN.INF"
  18. Exit_Code        = 0
  19. BillboardVisible = 0
  20. from      = ""
  21. to        = ""
  22. ExitCodeOk     = 0
  23. ExitCodeCancel = 1
  24. ExitCodeFatal  = 2
  25. KeyNull         = ""
  26. MAXIMUM_ALLOWED   = 33554432
  27. SERVICE_NO_CHANGE = 4294967295
  28. RegistryErrorIndex = NO_ERROR
  29. KeyProduct      = ""
  30. KeyParameters   = ""
  31. TRUE            = 1
  32. FALSE           = 0
  33. NoTitle         = 0
  34. ExitState   = "Active"
  35. OldVersionExisted = $(FALSE)
  36. !DebugOutputControl = 0
  37. [date]
  38.     Now = {} ? $(!LIBHANDLE) GetSystemDate
  39. [Identify]
  40.     read-syms Identification
  41.     set Status     = STATUS_SUCCESSFUL
  42.     set Identifier = $(OptionType)
  43.     set Media      = #("Source Media Descriptions", 1, 1)
  44.     Return $(Status) $(Identifier) $(Media)
  45. [ReturnOptions]
  46.     set Status        = STATUS_FAILED
  47.     set OptionList     = {}
  48.     set OptionTextList = {}
  49.     set LanguageList = ^(LanguagesSupported, 1)
  50.     Ifcontains(i) $($0) in $(LanguageList)
  51.         goto returnoptions
  52.     else
  53.         set Status = STATUS_NOLANGUAGE
  54.         goto finish_ReturnOptions
  55.     endif
  56. returnoptions = +
  57.     ifstr(i) $(!STF_PRODUCT) != WINNT
  58.         set OptionList     = ^(Options, 1)
  59.         set OptionTextList = ^(OptionsText$($0), 1)
  60.     endif
  61.     set Status         = STATUS_SUCCESSFUL
  62. finish_ReturnOptions = +
  63.     Return $(Status) $(OptionList) $(OptionTextList)
  64. [InstallOption]
  65.     set Option   = $($1)
  66.     set SrcDir   = $($2)
  67.     set AddCopy  = $($3)
  68.     set DoCopy   = $($4)
  69.     set DoConfig = $($5)
  70.     set InstallFrom = $($6)
  71.     ifstr(i) $(InstallFrom) == ""
  72.         set InstallFrom = "NWLNKRIP"
  73.     endif
  74.     set LanguageList = ^(LanguagesSupported, 1)
  75.     Ifcontains(i) $($0) NOT-IN $(LanguageList)
  76.         Return STATUS_NOLANGUAGE
  77.     endif
  78.     set-subst LF = "\n"
  79.     read-syms GeneralConstants
  80.     read-syms FileConstants
  81.     read-syms DialogConstants$(!STF_LANGUAGE)
  82.     ifstr(i) $(!NTN_Origination) == "NCPA"
  83.         set Continue = $(OK)
  84.     endif
  85.     read-syms FileConstants$(!STF_LANGUAGE)
  86.     detect date
  87.     set-title  $(FunctionTitle)
  88.     set to   = Begin
  89.     set from = Begin
  90.     set CommonStatus = STATUS_SUCCESSFUL
  91.     EndWait
  92. Begin = +
  93.     Ifstr(i) $(!NTN_InstallMode) == deinstall
  94.         set StartLabel = removeadapter
  95.     else-Ifstr(i) $(!NTN_InstallMode) == Update
  96.         set StartLabel = UpgradeSoftware
  97.     else-Ifstr(i) $(!NTN_InstallMode) == configure
  98.         set StartLabel = configureadapter
  99.     else-Ifstr(i) $(!NTN_InstallMode) == bind
  100.         set StartLabel = bindingadapter
  101.     else
  102.         set StartLabel = installadapter
  103.         set OEM_ABANDON_SOFTWARE = {}
  104.         set OEM_ABANDON_OPTIONS = {}
  105.     endif
  106.     set from = $(fatal)
  107.     set to = $(fatal)
  108.     goto $(StartLabel)
  109. installadapter = +
  110.     set OEM_ABANDON_ON  = TRUE
  111.     StartWait
  112.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeySoftware
  113.     Ifstr(i) $(KeySoftware) == $(KeyNull)
  114.         ifstr(i) $(!NTN_InstallMode) == "install"
  115.             Ifstr(i) $(DoCopy) == "YES"
  116.                 Shell $(UtilityInf), DoAskSource, $(!STF_CWDDIR), $(SrcDir) YES
  117.                 Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  118.                    Goto ShellCodeError
  119.                 Else-Ifstr(i) $($R0) == STATUS_FAILED
  120.                    Shell $(UtilityInf) RegistryErrorString "ASK_SOURCE_FAIL"
  121.                    ifint $($ShellCode) != $(!SHELL_CODE_OK)
  122.                       goto ShellCodeError
  123.                    endif
  124.                    set Error = $($R0)
  125.                    Goto fatal
  126.                 Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  127.                    Goto successful
  128.                 Endif
  129.                 Set SrcDir = $($R1)
  130.             Endif
  131.             set NwlnkName = "NWLINKIPX"
  132.             OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLINKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  133.             Ifstr $(BS_KeyServices) == $(KeyNull)
  134.                 set NwlnkName = "NWLNKIPX"
  135.                 OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKIPX" $(MAXIMUM_ALLOWED) BS_KeyServices
  136.                 Ifstr $(BS_KeyServices) == $(KeyNull)
  137.                     Shell "oemnxpip.inf" ReturnOptions $(!STF_LANGUAGE)
  138.                     ifstr(i) $($R0) == STATUS_SUCCESSFUL
  139.                         set OldStfSrcDir = $(!STF_SRCDIR_OVERRIDE)
  140.                         set !STF_SRCDIR_OVERRIDE = ""
  141.                         set NwlnkName = *($($R1),1)
  142.                         Shell "oemnxpip.inf" InstallOption $(!STF_LANGUAGE), *($($R1),1),+
  143.                             $(SrcDir), $(AddCopy), "NO", $(DoConfig)
  144.                         set !STF_SRCDIR_OVERRIDE = $(OldStfSrcDir)
  145.                     else
  146.                         Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "NONFATAL", $(InstallNWLINKFirst)
  147.                         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  148.                             goto ShellCodeError
  149.                         endif
  150.                         goto end
  151.                     endif
  152.                 else
  153.                     CloseRegKey $(BS_KeyServices)
  154.                 endif
  155.             else
  156.                 CloseRegKey $(BS_KeyServices)
  157.             endif
  158.             Debug-Output "OEMNSVRR.INF: installadapter: installing [Install-Option]"
  159.             install "Install-Option"
  160.             ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  161.                Shell $(UtilityInf) RegistryErrorString "UNABLE_COPY_FILE"
  162.                ifint $($ShellCode) != $(!SHELL_CODE_OK)
  163.                    goto ShellCodeError
  164.                endif
  165.                set Error = $($R0)
  166.                goto fatal
  167.             endif
  168.         endif
  169.         OpenRegKey $(!REG_H_LOCAL) "" $(!NTN_ServiceBase)"\NWLNKRIP" $(MAXIMUM_ALLOWED) KeyService
  170.         Ifstr(i) $(KeyService) == $(KeyNull)
  171.             Shell $(UtilityInf), AddSoftwareComponent, "Microsoft", +
  172.                 $(ProductNWLNKRIPName), +
  173.                 $(ProductNWLNKRIPName), +
  174.                 $(ProductNWLNKRIPDisplayName), +
  175.                 $(STF_CONTEXTINFNAME),+
  176.                 $(ProductNWLNKRIPImagePath), +
  177.                 "kernelautostart" , "", {"NWLNKIPX"}, ""
  178.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  179.                 Debug-Output "OEMNSVRR.INF: ShellCode error"
  180.                 return STATUS_FAILED
  181.             endif
  182.             set RegistryErrorIndex = $($R0)
  183.             set ProductKey = $($R1)
  184.             set RuleKey = $($R2)
  185.             CloseRegKey $($R3)
  186.             set ParamKey = $($R4)
  187.             CloseRegKey $($R5)
  188.             Ifstr(i) $(RegistryErrorIndex) != "NO_ERROR"
  189.                 EndWait
  190.                 Debug-Output "OEMNSVRR.INF: Registry Error "$(RegistryErrorIndex)
  191.                 CloseRegKey $($R1)
  192.                 CloseRegKey $($R2)
  193.                 CloseRegKey $($R4)
  194.                 goto fatalregistry
  195.             endif
  196.             set NewValueList = {{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  197.                                {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPTitle)},+
  198.                                {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPDescription)},+
  199.                                {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  200.                                {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  201.             Shell  $(UtilityInf), AddValueList, $(ProductKey), $(NewValueList)
  202.             CloseRegKey $(ProductKey)
  203.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  204.                 Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP router service"
  205.                 goto ShellCodeError
  206.             endif
  207.             set RegistryErrorIndex = $($R0)
  208.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  209.                 EndWait
  210.                 Debug-Output "OEMNSVRR.INF:  error: create service"
  211.                 set Status = STATUS_FAILED
  212.             endif
  213.             set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),"NWLNKRIP"}}
  214.             Shell  $(UtilityInf), AddValueList, $(RuleKey), $(NewValueList)
  215.             CloseRegKey $(RuleKey)
  216.             ifint $($ShellCode) != $(!SHELL_CODE_OK)
  217.                 Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP service"
  218.                 goto ShellCodeError
  219.             endif
  220.             set RegistryErrorIndex = $($R0)
  221.             Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  222.                 EndWait
  223.                 Debug-Output "OEMNSVRR.INF: Registry error: create service"
  224.                 set Status = STATUS_FAILED
  225.             endif
  226.             SetRegValue $(ParamKey) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  227.             SetRegValue $(ParamKey) {EnableLanRouting, $(NoTitle), $(!REG_VT_DWORD), 1}
  228.             CloseRegKey $(ParamKey)
  229.         else
  230.             OpenRegKey $(KeyService) "" "Parameters\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  231.             Ifstr(i) $(KeyUseRef) != $(KeyNull)
  232.                  SetRegValue $(KeyUseRef) {$(InstallFrom) , 0, $(!REG_VT_SZ), "1"}
  233.                  CloseRegKey $(KeyUseRef)
  234.             Endif
  235.             OpenRegKey $(KeyService) "" "Parameters" $(MAXIMUM_ALLOWED) KeyParam
  236.             Ifstr(i) $(KeyParam) != $(KeyNull)
  237.                 GetRegValue $(KeyParam),"NetbiosRouting", NetbiosRoutingInfo
  238.                 Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  239.                    SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  240.                 endif
  241.                 GetRegValue $(KeyParam),"EnableLanRouting", EnableLanRoutingInfo
  242.                 Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  243.                    SetRegValue $(ParamKey) {EnableLanRouting, $(NoTitle), $(!REG_VT_DWORD), 1}
  244.                 endif
  245.                 CloseRegKey $(KeyParam)
  246.             endif
  247.             CloseRegKey $(KeyService)
  248.             Shell $(UtilityInf), InstallSoftwareProduct, $(Manufacturer), $(ProductNWLNKRIPName), $(STF_CONTEXTINFNAME)
  249.             set RegistryErrorIndex = $($R0)
  250.             Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  251.                 set KeyVersion  = $($R1)
  252.                 set KeyRules    = $($R2)
  253.                 set NewValueList = {{MajorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMajorVersion)},+
  254.                                    {Title,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPTitle)},+
  255.                                    {Description,$(NoTitle),$(!REG_VT_SZ),$(ProductNWLNKRIPDescription)},+
  256.                                    {MinorVersion,$(NoTitle),$(!REG_VT_DWORD),$(ProductMinorVersion)},+
  257.                                    {InstallDate,$(NoTitle),$(!REG_VT_DWORD),*($(Now),1)}}
  258.                 Shell  $(UtilityInf), AddValueList, $(KeyVersion), $(NewValueList)
  259.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  260.                     Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP router service"
  261.                     goto ShellCodeError
  262.                 endif
  263.                 set RegistryErrorIndex = $($R0)
  264.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  265.                     EndWait
  266.                     Debug-Output "OEMNSVRR.INF:  error: Add values to version key"
  267.                     set Status = STATUS_FAILED
  268.                 endif
  269.                 set NewValueList = {{InfOption,$(NoTitle),$(!REG_VT_SZ),"NWLNKRIP"}}
  270.                 Shell  $(UtilityInf), AddValueList, $(KeyRules), $(NewValueList)
  271.                 ifint $($ShellCode) != $(!SHELL_CODE_OK)
  272.                     Debug-Output "utility.INF: ShellCode error. Cannot add NWLNKRIP netrule value"
  273.                     goto ShellCodeError
  274.                 endif
  275.                 set RegistryErrorIndex = $($R0)
  276.                 Ifstr(i) $(RegistryErrorIndex) != NO_ERROR
  277.                     EndWait
  278.                     Debug-Output "OEMNSVRR.INF: Registry error: Add netrule"
  279.                     set Status = STATUS_FAILED
  280.                 endif
  281.                 Shell $(UtilityInf), LinkToService, $(KeyVersion), "NWLNKRIP", service
  282.                 set RegistryErrorIndex = $($R0)
  283.                 Ifstr(i) $(RegistryErrorIndex) == NO_ERROR
  284.                     GetRegValue $(KeyVersion),"RefCount", RefCountInfo
  285.                     Ifint $(RegLastError) != $(!REG_ERROR_SUCCESS)
  286.                         SetRegValue $(KeyVersion) {RefCount,$(NoTitle),$(!REG_VT_DWORD),0}
  287.                     endif
  288.                     Shell "" AddNWLNKRIPUsed "RAS"
  289.                 endif
  290.                 ifstr $(KeyVersion) != $(KeyNull)
  291.                     CloseRegKey $(KeyVersion)
  292.                 endif
  293.                 ifstr $(KeyRules) != $(KeyNull)
  294.                     CloseRegKey $(KeyRules)
  295.                 endif
  296.             endif
  297.         endif
  298.     Else
  299.         GetRegValue $(KeySoftware) "MajorVersion" VersionInfo
  300.         set VersionMajor = *($(VersionInfo), 4)
  301.         GetRegValue $(KeySoftware) "MinorVersion" VersionInfo
  302.         set VersionMinor = *($(VersionInfo), 4)
  303.         set InstalledVersion = $(VersionMajor)"."$(VersionMinor)
  304.         ifstr(i) $(InstallFrom) == "NWLNKRIP"
  305.             read-syms VerExists$(!STF_LANGUAGE)
  306.             set Text = $(Product$(Option)Description)$(Ver)$(ProductVersion)+
  307.                        $(Text1)
  308.             Shell $(subroutineinf), SetupMessage $(!STF_LANGUAGE) "NONFATAL" $(Text)
  309.             Ifint $($ShellCode) != $(!SHELL_CODE_OK)
  310.                 Goto fatal
  311.             Else-Ifstr(i) $($R0) == STATUS_FAILED
  312.                 Goto fatal
  313.             Else-Ifstr(i) $($R0) == STATUS_USERCANCEL
  314.                 Goto end
  315.             Endif
  316.         else
  317.             Shell "" AddNWLNKRIPUsed $(InstallFrom)
  318.         endif
  319.         goto end
  320.     EndIf
  321.     Ifstr(i) $(KeySoftware) != $(KeyNull)
  322.         CloseRegKey $(KeySoftware)
  323.     endif
  324.     Shell "" AddNWLNKRIPUsed $(InstallFrom)
  325.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductSAPKeyName) $(MAXIMUM_ALLOWED) SAPKeyProduct
  326.     ifstr(i) $(SAPKeyProduct) == ""
  327.         set !STF_SRCDIR_OVERRIDE = $(SrcDir)
  328.         Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  329.           $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "NWLNKRIP"
  330.     endif
  331.     EndWait
  332.     goto configureadapter
  333. configureadapter = +
  334.     ifstr(i) $(!NTN_InstallMode) == configure
  335.         set CommonStatus = STATUS_NO_EFFECT
  336.     endif
  337.     Debug-Output "OEMNSVRR.INF: !STF_UNATTENDED = "$(!STF_UNATTENDED)
  338.     set Unattended = NO
  339.     ifstr(i) $(!STF_UNATTENDED) == "YES"
  340.         set Unattended = "YES"
  341.     else-ifstr(i) $(!STF_UNATTENDED) != ""
  342.         set Unattended = "YES"
  343.     endif
  344.     ifstr(i) $(Unattended) == NO
  345.         set NetbiosRouting = 0
  346.         set ServiceName = $(!NTN_ServiceBase)"\NWLNKRIP\Parameters"
  347.         OpenRegKey $(!REG_H_LOCAL) "" $(ServiceName) $(MAXIMUM_ALLOWED) KeyParam
  348.         Ifstr(i) $(KeyParam) != $(KeyNull)
  349.             GetRegValue $(KeyParam),"NetbiosRouting", NetbiosRoutingInfo
  350.             Ifint $(RegLastError) == $(!REG_ERROR_SUCCESS)
  351.                set NetbiosRouting = *($(NetbiosRoutingInfo), 4)
  352.             else
  353.                SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), 0}
  354.             endif
  355.         else
  356.             read-syms ConfigErrorTxt$(!STF_LANGUAGE)
  357.             shell "subroutn.inf" SetupMessage $(!STF_LANGUAGE) WARNING $(Error)
  358.             ifstr(i) $($R0) != STATUS_SUCCESSFUL
  359.                 goto ShellCodeError
  360.             endif
  361.             goto end
  362.         endif
  363.         read-syms EnableNetbiosRoutingDlg$(!STF_LANGUAGE)
  364.         ifint $(NetbiosRouting) == 0
  365.             set STF_MB_TEXT = $(Disabled)
  366.         else-ifint $(NetbiosRouting) == 2
  367.             set STF_MB_TEXT = $(Disabled)
  368.         else
  369.             set STF_MB_TEXT = $(Enabled)
  370.         endif
  371.         ui start "EnableNetbiosDlg"
  372.         ifstr(i) $(DLGEVENT) == "YES"
  373.             ifint $(NetbiosRouting) == 0
  374.                set NetbiosRouting = 1
  375.             else-ifint $(NetbiosRouting) == 1
  376.                set NetbiosRouting = 0
  377.             else-ifint $(NetbiosRouting) == 2
  378.                set NetbiosRouting = 3
  379.             else-ifint $(NetbiosRouting) == 3
  380.                set NetbiosRouting = 2
  381.             endif
  382.             ifstr(i) $(KeyParam) != $(KeyNull)
  383.                 SetRegValue $(KeyParam) {NetbiosRouting, $(NoTitle), $(!REG_VT_DWORD), $(NetbiosRouting)}
  384.                 CloseRegKey $(KeyParam)
  385.                 set CommonStatus = STATUS_SUCCESSFUL
  386.             endif
  387.         endif
  388.     endif
  389.     goto end
  390. bindingadapter =+
  391.     goto end
  392. removeadapter = +
  393.     set NwlnkRipKeyName = "System\CurrentControlSet\Services\NwlnkRip"
  394.     set ProductNWLNKRIPName  = "NwlnkRip"
  395.     Shell "" RemoveNWLNKRIPUsed $(InstallFrom)
  396.     OpenRegKey $(!REG_H_LOCAL) "" $(NwlnkRipKeyName) $(MAXIMUM_ALLOWED) BS_KeyServices
  397.     Ifstr $(BS_KeyServices) != $(KeyNull)
  398.         CloseRegKey $(BS_KeyServices)
  399.         Shell "" NumOfUsed
  400.         set NumOfUsed = $($R0)
  401.         ifint $(NumOfUsed) == 1
  402.             Shell "" FindUsed "RAS"
  403.             set RasUsing = $($R0)
  404.             ifstr(i) $(RasUsing) == TRUE
  405.                 Shell "oemnsvra.inf" CheckRasInstalled
  406.                 set RasInstalled = $($R0)
  407.                 ifstr(i) $(RasInstalled) == FALSE
  408.                     Debug-Output "OEMNSVRR.INF: The only consumer RAS is not installed, so removing NWLNKRIP service"
  409.                     set NumOfUsed = 0
  410.                 endif
  411.             endif
  412.             Shell "" FindUsed "NWLNKRIP"
  413.             ifstr(i) $($R0) == TRUE
  414.                 set NumOfUsed = 0
  415.             endif
  416.         endif
  417.         ifint $(NumOfUsed) == 0
  418.             Shell $(UtilityInf), RemoveSoftwareComponent, $(Manufacturer), $(ProductNWLNKRIPName)
  419.         else
  420.             ifstr(i) $(InstallFrom) == "NWLNKRIP"
  421.                 read-syms InUse$(!STF_LANGUAGE)
  422.                 set from = end
  423.                 set to = end
  424.                 goto warning
  425.             endif
  426.         endif
  427.     endif
  428.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductSAPKeyName) $(MAXIMUM_ALLOWED) SAPKeyProduct
  429.     ifstr(i) $(SAPKeyProduct) != ""
  430.         set OldInstallMode = $(!NTN_InstallMode)
  431.         set !NTN_InstallMode = deinstall
  432.         Shell "oemnsvsa.inf" InstallOption $(!STF_LANGUAGE) "SAP"  +
  433.             $(SrcDir) $(AddCopy) $(DoCopy) $(DoConfig) "NWLNKRIP"
  434.         set !NTN_InstallMode = $(OldInstallMode)
  435.     endif
  436.     goto end
  437. UpgradeSoftware = +
  438.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyProduct
  439.     Ifstr(i) $(KeyProduct) != $(KeyNull)
  440.         install "Install-Update"
  441.         ifstr(i) $(STF_INSTALL_OUTCOME) != STF_SUCCESS
  442.             goto fatal
  443.         endif
  444.         SetRegValue $(KeyProduct) {MajorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMajorVersion)}
  445.         SetRegValue $(KeyProduct) {MinorVersion,$(NoTitle),$(!REG_VT_SZ),$(ProductMinorVersion)}
  446.         CloseRegKey $(KeyProduct)
  447.     endif
  448.     goto end
  449. successful = +
  450.     goto end
  451. infomsg =+
  452.    read-syms InfoDlg
  453.    ui start "Warning"
  454.    set CommonStatus = STATUS_USERCANCEL
  455.    goto end
  456. warning = +
  457.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "STATUS", $(Error)
  458.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  459.         goto ShellCodeError
  460.     endif
  461.     ifstr(i) $($R1) == "OK"
  462.         goto $(to)
  463.     else-ifstr(i) $($R1) == "CANCEL"
  464.         goto $(from)
  465.     else
  466.         goto "end"
  467.     endif
  468. nonfatalinfo = +
  469.     Set CommonStatus = STATUS_USERCANCEL
  470.     Set Severity = STATUS
  471.     goto nonfatalmsg
  472. nonfatal = +
  473.     Set Severity = NONFATAL
  474.     goto nonfatalmsg
  475. nonfatalmsg = +
  476.     ifstr(i) $(Error) == ""
  477.         Set Severity = NONFATAL
  478.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  479.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  480.             goto ShellCodeError
  481.         endif
  482.         set Error = $($R0)
  483.     endif
  484.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), $(Severity), $(Error)
  485.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  486.         goto ShellCodeError
  487.     endif
  488.     ifstr(i) $($R1) == "OK"
  489.         goto $(from)
  490.     else
  491.         goto "end"
  492.     endif
  493. fatalregistry = +
  494.     Shell $(UtilityInf) RegistryErrorString $(RegistryErrorIndex)
  495.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  496.         goto ShellCodeError
  497.     endif
  498.     set Error = $($R0)
  499.     goto fatal
  500. fatal = +
  501.     ifstr(i) $(Error) == ""
  502.         Shell $(UtilityInf) RegistryErrorString "SETUP_FAIL"
  503.         ifint $($ShellCode) != $(!SHELL_CODE_OK)
  504.             goto ShellCodeError
  505.         endif
  506.         set Error = $($R0)
  507.     endif
  508.     Ifint $(BillboardVisible) != 0
  509.         Shell "subroutn.inf" PopBillboard
  510.         Set BillboardVisible = 0
  511.     Endif
  512.     Shell $(subroutineinf) SetupMessage, $(!STF_LANGUAGE), "FATAL", $(Error)
  513.     ifint $($ShellCode) != $(!SHELL_CODE_OK)
  514.         goto ShellCodeError
  515.     endif
  516.    goto setfailed
  517. ShellCodeError = +
  518.     set DlgType      = "MessageBox"
  519.     set STF_MB_TITLE = $(ShellCodeErrorTitle)
  520.     set STF_MB_TEXT  = $(ShellCodeErrorText)
  521.     set STF_MB_TYPE  = 1
  522.     set STF_MB_ICON  = 3
  523.     set STF_MB_DEF   = 1
  524.     ui start "Error Message"
  525.     goto setfailed
  526. setfailed = +
  527.     set CommonStatus = STATUS_FAILED
  528.     ifstr(i) $(OEM_ABANDON_ON) == TRUE
  529.         set OEM_ABANDON_ON = FALSE
  530.         goto removeadapter
  531.     endif
  532.     goto end
  533. end = +
  534.     goto term
  535. term = +
  536.     Return $(CommonStatus)
  537. [Install-Option]
  538.     set STF_VITAL = "NO"
  539.     ifstr(i) $(AddCopy) == "YES"
  540.         AddSectionFilesToCopyList Files-NWLNKRIP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  541.     endif
  542.     ifstr(i) $(DoCopy) == "YES"
  543.        set !STF_NCPA_FLUSH_COPYLIST = TRUE
  544.        CopyFilesInCopyList
  545.     endif
  546.     ifstr(i) $(DoConfig) == "YES"
  547.     endif
  548.     Exit
  549. [Install-Update]
  550.    set STF_VITAL        = "NO"
  551.    set STF_OVERWRITE    = "VERIFYSOURCEOLDER"
  552.    AddSectionFilesToCopyList Files-NWLNKRIP $(SrcDir) $(!STF_WINDOWSSYSPATH)\drivers
  553.    Exit
  554. [AddNWLNKRIPUsed]
  555.     read-syms GeneralConstants
  556.     read-syms FileConstants
  557.     read-syms FileConstants$(!STF_LANGUAGE)
  558.     set KeyName = $($0)
  559.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  560.     ifstr(i) $(KeyService) != ""
  561.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  562.         ifstr(i) $(KeyUseRef) == ""
  563.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  564.         endif
  565.         ifstr(i) $(KeyUseRef) != ""
  566.             SetRegValue $(KeyUseRef) {$(KeyName),$(NoTitle),$(!REG_VT_SZ),"1"}
  567.             CloseRegKey $(KeyUseRef)
  568.         endif
  569.         CloseRegKey $(KeyService)
  570.     else
  571.     endif
  572.     return
  573. [RemoveNWLNKRIPUsed]
  574.     read-syms GeneralConstants
  575.     read-syms FileConstants
  576.     read-syms FileConstants$(!STF_LANGUAGE)
  577.     set KeyName = $($0)
  578.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  579.     ifstr(i) $(KeyService) != ""
  580.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  581.         ifstr(i) $(KeyUseRef) == ""
  582.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  583.         endif
  584.         ifstr(i) $(KeyUseRef) != ""
  585.             DeleteRegValue $(KeyUseRef) $(KeyName)
  586.             CloseRegKey $(KeyUseRef)
  587.         endif
  588.         CloseRegKey $(KeyService)
  589.     else
  590.     endif
  591.     return
  592. [NumOfUsed]
  593.     read-syms GeneralConstants
  594.     read-syms FileConstants
  595.     read-syms FileConstants$(!STF_LANGUAGE)
  596.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  597.     ifstr(i) $(KeyService) != ""
  598.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  599.         ifstr(i) $(KeyUseRef) == ""
  600.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  601.         endif
  602.         ifstr(i) $(KeyUseRef) != ""
  603.             EnumRegValue $(KeyUseRef) UsageList
  604.             set Num = 0
  605.             ForListDo $(UsageList)
  606.                 set-add Num = $(Num), 1
  607.             EndForListDo
  608.             CloseRegKey $(KeyUseRef)
  609.         endif
  610.         CloseRegKey $(KeyService)
  611.     else
  612.     endif
  613.     return $(Num)
  614. [FindUsed]
  615.     read-syms GeneralConstants
  616.     read-syms FileConstants
  617.     read-syms FileConstants$(!STF_LANGUAGE)
  618.     set KeyName = $($0)
  619.     set Find = FALSE
  620.     OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName) $(MAXIMUM_ALLOWED) KeyService
  621.     ifstr(i) $(KeyService) != ""
  622.         OpenRegKey $(!REG_H_LOCAL) "" $(ProductKeyName)"\UseRef" $(MAXIMUM_ALLOWED) KeyUseRef
  623.         ifstr(i) $(KeyUseRef) == ""
  624.             CreateRegKey $(KeyService) {"UseRef",$(NoTitle),GenericClass} "" $(MAXIMUM_ALLOWED) "" KeyUseRef
  625.         endif
  626.         ifstr(i) $(KeyUseRef) != ""
  627.             GetRegValue $(KeyUseRef),$(KeyName), KeyInfo
  628.             ifstr(i) $(RegLastError) == $(!REG_ERROR_SUCCESS)
  629.                 set Find = TRUE
  630.             endif
  631.             CloseRegKey $(KeyUseRef)
  632.         endif
  633.         CloseRegKey $(KeyService)
  634.     else
  635.     endif
  636.     return $(Find)
  637. [Source Media Descriptions]
  638.     1 = "Windows NT Workstation CD-ROM" , TAGFILE = cdrom.w
  639. [Signature]
  640.     FileType = MICROSOFT_FILE
  641. [GetSignature]
  642.     read-syms Signature
  643.     return $(FileType)
  644. [ProductType]
  645. STF_PRODUCT  = Winnt
  646. STF_PLATFORM = I386
  647. [Files-Inf]
  648. 2,    oemsetup.inf,     SIZE=1000,    RENAME=$(!UG_Filename)
  649. [Files-NWLNKRIP]
  650. 1,NWLNKRIP.SYS , SIZE=999
  651. [LanguagesSupported]
  652.     ENG
  653. [OptionsTextENG]
  654.     NWLNKRIP = "RIP for NwLink IPX/SPX compatible transport"
  655. [FileConstantsENG]
  656. ProCaption   = "Windows NT Setup"
  657. ProCancel    = "Cancel"
  658. ProCancelMsg = "Windows NT Networking is not correctly installed.  "+
  659.                "Are you sure you want to cancel copying files?"
  660. ProCancelCap = "Network Setup Message"
  661. ProText1     = "Copying:"
  662. ProText2     = "To:"
  663. ProductNWLNKRIPTitle       = "RIP for NWLink IPX"
  664. ProductNWLNKRIPDescription = "RIP for NWLink IPX"
  665. ProductNWLNKRIPDisplayName = "RIP for NWLink IPX"
  666. [VerExistsENG]
  667.     Ver   = " version "
  668.     Text1 = " is already installed. Please use"+
  669.             " [Update] option from the Network Control Panel"+
  670.             " aplet to Update RIP for NWLink IPX."
  671. [InUseENG]
  672. Error = "RIP for NWLink IPX is currently in use by other network protocols. Please remove all related services first."
  673. [DialogConstantsENG]
  674. Help        = "&Help"
  675. Exit        = "Cancel"
  676. OK          = "OK"
  677. HelpContext = ""
  678. Continue    = "Continue"
  679. Cancel      = "Cancel"
  680. [EnableNetbiosRoutingDlgENG]
  681. DlgType = "MessageBox"
  682. STF_MB_TITLE = "RIP for NWLink IPX Configuration"
  683. STF_MB_TYPE  = 3
  684. STF_MB_ICON  = 2
  685. STF_MB_DEF   = 2
  686. Enabled  = "Netbios Broadcast Propagation (broadcast of type 20 packets) is currently enabled. Do you want to disable it?"
  687. Disabled = "Netbios Broadcast Propagation (broadcast of type 20 packets) is currently disabled. Do you want to enable it?"
  688. [ConfigErrorTxtENG]
  689. Error = "Could not open the NWLNKRIP\Parameters registry key."
  690.